<template>
	<view class="">
		<x-video-player  ref="videoPlayer" videoId="myVideo" :src="videoSrc" :progress="progress" :step="10" @play="videoPlay" @pause="videoPause"
			@ended="videoEnded" @timeupdate="videoTimeUp" @loadeddata="videoLoaded" @seeking="videoSeeking"
			@seeked="videoSeeked" @error="videoError" />
	</view>
</template>
<script>
	import xVideoPlayer from '@/components/x-video-player/x-video-player.vue'
	export default {
		components: {
			xVideoPlayer
		},
		data() {
			return {
				videoSrc:"https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126-lite.m4v",
				progress: 0.1,
			}
		},
		methods: {
			// 视频信息加载完成
			videoLoaded(durationTime) {},
			// 当前播放时间
			videoTimeUp(currentTime) {},
			// 点击原始播放
			videoPlay() {},
			// 正在拖动
			videoSeeking() {},
			// 拖动结束
			videoSeeked(e) {},
			// 触发暂停
			videoPause() {},
			// 播放结束
			videoEnded() {},
			// 播放错误
			videoError() {}
		}
	}
</script>
